fix: Multi Developer OpenCode - #21
Merged
Merged
Conversation
…Helm conflicts - Add SKIP_OPENCODE_BUILD detection to the Makefile devspace deploy target: when opencode-build already exists on the cluster, opencodeBuild.enabled is automatically set to false so 2nd+ opencode developer installs do not fight over the shared namespace/BuildConfig/ImageStream. - Also add helm.sh/resource-policy: keep to the opencode-build Namespace so uninstalling the owning release does not delete the built image and break other running workspaces. Document the manual override flag in the HELM_ARGS table and multi-developer section of the README. Fix hardcoded personal namespace in values-platform-config.yaml.
- Extend helm.sh/resource-policy: keep to ImageStream, BuildConfig, and both RoleBindings so uninstalling the owning release does not destroy the built image and break other running OpenCode workspaces
- Change Makefile skip-detection from namespace existence to BuildConfig existence, enabling automatic recovery when the namespace is orphaned but the build objects are gone
- Move the auto --set opencodeBuild.enabled=false flag to after $(HELM_ARGS) so it cannot be overridden by a caller passing
opencodeBuild.enabled=true in HELM_ARGS
- Wire pca-guardrails.namespace=$(AI_NAMESPACE) in ai-serving deploy alongside the existing pca-observability wiring
- Expand README callout with do-not-uninstall warning and recovery steps
Hadar301
marked this pull request as ready for review
July 29, 2026 11:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Multiple opencode devspace deployments fail with a Helm ownership conflict on the shared
opencode-buildnamespace, because everymake devspace-deploy-existing-openshiftrun unconditionally tries to own the sameNamespace,ImageStream,BuildConfig, andRoleBindingresources. This PR adds auto-detection to the Makefile so 2nd+ developers never hit the conflict, hardens the template against accidental deletion, and fixes a hardcoded personal namespace in the existing-OpenShift values file.Related Issues / Tickets
N/A
Type of Change
Changes
Makefile— Before thehelm upgrade --installcall indevspace-deploy-existing-openshift, detect whetheropencode-buildalready exists on the cluster. If it does andTYPE=opencode, automatically inject--set opencodeBuild.enabled=falseso the new release does not attempt to own the shared build infrastructure.charts/pca-devspaces/templates/opencode-image-build.yaml— Addhelm.sh/resource-policy: keepto theopencode-buildNamespace so that uninstalling the owning release does not delete the namespace and built image, which would break all other running OpenCode workspaces.deploy_existing_openshift/README.md— Add--set opencodeBuild.enabled=falseto the Common HELM_ARGS table and a callout in the multi-developer section explaining the singleton build infrastructure and the Makefile auto-detection.deploy_existing_openshift/values-platform-config.yaml— Replace hardcoded personal namespacehacohen-ai-coderwith the chart defaultai-servinginpca-guardrails.namespace.Quality Gates
yamllint,yamlfmt, secret scan)helm template)Verification
Environment:
api-ai-dev02.kni.syseng.devcluster.openshift.com, contexthacohen-pcaBug reproduced before fix:
Fix verified:
hacohen-pca, 3 OpenCode devspaces (dev-user1/2/3) all deployed and working; OpenCode chat verified end-to-end